Other Classes

The following classes are available globally.

  • An MGLStyleValue object is a generic container for a style attribute value. The layout and paint attribute properties of MGLStyleLayer can be set to MGLStyleValue objects.

    The MGLStyleValue class itself represents a class cluster. Under the hood, a particular MGLStyleValue object may be either an MGLStyleConstantValue to represent a constant value or an MGLStyleFunction to represent a value function. Do not initialize an MGLStyleValue object directly; instead, use one of the class factory methods to create an MGLStyleValue object.

    The MGLStyleValue class takes a generic parameter T that indicates the Foundation class being wrapped by this class. Common values for T include:

    • `NSNumber` (for Boolean values, floating-point numbers, and enumerations)
    • `NSValue` (for `CGVector`, `NSEdgeInset`, and `UIEdgeInset`s)
    • `NSString`
    • `NSColor` or `UIColor`
    • `NSArray`
    See more

    Declaration

    Objective-C

    @interface MGLStyleValue <T> : NSObject

    Swift

    class MGLStyleValue
  • An MGLStyleConstantValue object is a generic container for a style attribute value that remains constant as the zoom level changes. The layout and paint attribute properties of MGLStyleLayer objects can be set to MGLStyleConstantValue objects.

    The MGLStyleConstantValue class takes a generic parameter T that indicates the Foundation class being wrapped by this class.

    See more

    Declaration

    Objective-C

    @interface MGLStyleConstantValue <T> : MGLStyleValue<T>

    Swift

    class MGLStyleConstantValue
  • An MGLStyleFunction is a value function defining a style value that changes as the zoom level changes. The layout and paint attribute properties of an MGLStyleLayer object can be set to MGLStyleFunction objects. Use a zoom level function to create the illusion of depth and control data density.

    The MGLStyleFunction class takes a generic parameter T that indicates the Foundation class being wrapped by this class.

    See more

    Declaration

    Objective-C

    @interface MGLStyleFunction <T> : MGLStyleValue<T>

    Swift

    class MGLStyleFunction